package com.xgh.design.strategy;

/**
 * @ClassName Price
 * @Description
 * @Author xinggh
 * @Date 2020/8/6 19:04
 * @Version 1.0
 **/
public class Price {

    private MemberStrategy strategy;

    public Price(MemberStrategy strategy) {

        this.strategy = strategy;
    }

    public Double getPrice(double booksPrice) {
        return strategy.getPrice(booksPrice);
    }

    public static void main(String[] args) {

        MemberStrategy strategy = new AdvanceMemberStrategy();
        Price price = new Price(strategy);
        System.out.println(price.getPrice(100));
    }
}
